extends layout

block content
  h1= title
  div#page-wrapper
    div#page-inner
        div.row
         if(!login)
            div.col-md-6.col-sm-12.col-xs-12
                div.panel.panel-default
                    div.panel-heading
                      
                        label 您尚未登陸
                        a(href="/login") 請登陸或者注冊 #{loginCount}
          
         div.row
                div.col-md-6.col-sm-12.col-xs-12
                    if (login)
                      div.panel.panel-default
                        div.panel-heading
                                div.panel-heading 配件信息
                                    div.panel-body
                                        div.row
                                         form(action="/sumbit_edit_goods",method="post",enctype="multipart/form-data")
                                            div.row
                                                div.col-sm-2
                                                    label 编号
                                                div.col-sm-4
                                                    input.form-control(name="UNIQUE_TAG",placeholder="UNIQUE_TAG",value="#{object.UNIQUE_TAG}")
                                            div.row
                                                div.col-sm-2
                                                    label 适用车型
                                                div.col-sm-4
                                                    input.form-control(name="SHIYONGCHEXING",placeholder="SHIYONGCHEXING",value="#{object.SHIYONGCHEXING}")
                                            div.row
                                                div.col-sm-2
                                                    label 配件名称
                                                div.col-sm-4
                                                    input.form-control(name="PEIJIANMINGCHENG",placeholder="PEIJIANMINGCHENG",value="#{object.PEIJIANMINGCHENG}")
                                            div.row
                                                div.col-sm-2
                                                    label 产地
                                                div.col-sm-4
                                                    input.form-control(name="CHANDI",placeholder="CHANDI",value="#{object.CHANDI}")
                                            div.row
                                                div.col-sm-2
                                                    label 库存状态
                                                div.col-sm-4
                                                    input.form-control(name="KUNCUNZHUANGTAI",placeholder="KUNCUNZHUANGTAI",value="#{object.KUNCUNZHUANGTAI}")
                                             div.row
                                                div.col-sm-2
                                                    label 库存量
                                                div.col-sm-4
                                                    input.form-control(name="KUNCUNLIANG",placeholder="KUNCUNLIANG",value="#{object.KUNCUNLIANG}")
                                            div.row
                                                div.col-sm-2
                                                    label 有优惠单位
                                                div.col-sm-4
                                                    input.form-control(name="YOUHUIDANWEI",placeholder="YOUHUIDANWEI",value="#{object.YOUHUIDANWEI}")

                                            div.row
                                                div.col-sm-2
                                                    label 进价
                                                div.col-sm-4
                                                    input.form-control(name="JINJIA",placeholder="JINJIA",value="#{object.JINJIA}")
                                            div.row
                                                div.col-sm-2
                                                    label 零件号
                                                div.col-sm-4
                                                    input.form-control(name="LINGJIANHAO",placeholder="LINGJIANHAO",value="#{object.LINGJIANHAO}")
                                            div.row
                                                div.col-sm-2
                                                    label 物料号
                                                div.col-sm-4
                                                    input.form-control(name="WULIAOHAO",placeholder="WULIAOHAO",value="#{object.WULIAOHAO}")
                                            div.row
                                                div.col-sm-2
                                                    label 条码号
                                                div.col-sm-4
                                                    input.form-control(name="TIAOMAHAO",placeholder="TIAOMAHAO",value="#{object.TIAOMAHAO}")
                                            div.row
                                                div.col-sm-2
                                                    label 上次进货日期
                                                div.col-sm-4
                                                    input.form-control(name="JINHUOSHIJIAN",placeholder="JINHUOSHIJIAN",value="#{object.JINHUOSHIJIAN}")
                                            div.row
                                                div.col-sm-2
                                                    label 图片列表
                                                div.col-sm-4 
                                                    label #{object.IMAGES}
                                            div.row
                                                div.col-sm-4   
                                                    input.form-control(name="IMAGES_LIST",type="file",placeholder="JINHUOSHIJIAN",value="#{object.JINHUOSHIJIAN}")
                                                    input.form-control(name="IMAGES_LIST",type="file",placeholder="JINHUOSHIJIAN",value="#{object.JINHUOSHIJIAN}")
                                                    input.form-control(name="IMAGES_LIST",type="file",placeholder="JINHUOSHIJIAN",value="#{object.JINHUOSHIJIAN}")
                                            div.form-group
                                                button(type="submit").btn.btn-default 编辑

    script.
        function do_notify()
        {
            var data={
                CONTROL:"notice",
                CONTENT:$("#notify_content").val(),
                S_IP:$("#s_ip").val(),
                S_PORT:$("#s_port").val()
            };
            console.log($("#notify_content").val());
            $.post("/smanager", data, function (data, status) {
                console.log(data, status);
                var o = JSON.parse(data);
                console.log(o.message);
                $("#result").val(o.message);
            });
        }